﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich">
<ui:composition template="main.xhtml">
	<ui:define name="title">
		<h:outputText value="#{Lang.prop[MySession.l]['sitesearch']}" />
	</ui:define>
	<ui:define name="body">
		<a4j:form id="searchForm" style="padding-top:10px;">
			<h:outputText value="#{Lang.prop[MySession.l]['keywords']}:" />
			<h:inputText value="#{MySession.searchKeyWords}" style="width:250px;margin-right:8px;">
			</h:inputText>
			<a4j:commandLink action="#{Search.buildRecordsList}" reRender="dataForm">
				<h:outputText value="#{Lang.prop[MySession.l]['search']}" class="btn" />
				<f:param name="reload" value="true" />
				<f:param name="resetPageNo" value="true" />
				<f:param name="redirect" value="true" />
			</a4j:commandLink>
		</a4j:form>
		<a4j:form id="dataForm" style="margin-top:3px;">
			<rich:dataTable id="dataTable" rows="#{MySession.pageSize}" value="#{Search.recordsList}" var="item" style="width:100%;" rowKeyVar="rowNum" styleClass="rich-table-nohover">
				<rich:column style="text-align:left;width:659px;white-space:normal;">
					<h:outputLink value="newsview.jsf" target="_blank">
						<h:outputText value="#{rowNum + 1}" class="datetimeBlue" style="font-size:14pt;margin-right:6px;"/>
						<h:outputText value="#{item.prop['title']}" escape="false" />
						<f:param name="view" value="true" />
						<f:param name="id" value="#{item.prop['id']}" />
						<f:param name="uuid" value="#{item.prop['uuid']}" />
					</h:outputLink>
					<p style="text-indent: 21px;">
						<h:outputText value="#{item.prop['content']}" escape="false" />
					</p>
				</rich:column>
			</rich:dataTable>
			<rich:dataTable id="dsTable" rows="#{MySession.pageSize}" value="#{Search.dsList}" var="item" style="width:100%;" reRender="ds">
				<f:facet name="footer">
					<ui:include src="ds.xhtml" />
				</f:facet>
			</rich:dataTable>
		</a4j:form>
	</ui:define>
</ui:composition>
</html>